/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.p2psimulator.entity.reputation.hibrid;

import org.p2psimulator.entity.Id;
import org.p2psimulator.entity.reputation.Reputation;

/**
 *
 * @author Amorim
 */
public class EigenReputation extends Reputation {

    public EigenReputation(double numplus, double numminus, Id rater, Id ratee) {
        super(numplus, numminus, rater, ratee);
    }

    @Override
    public double getAverageReputation() {
        //;
        double diff = super.getAverageReputation();

        // normalizando de [-1;1] para [0:1]
        diff = (diff+1.0)/2.0;
        //diff = diff < 0 ? 0 : diff;
        return diff;
        //return getNormalizedValue();
    }
}

